package cn.edu.common;

import cn.edu.bean. Doctor;
import org.springframework.security.core.context.SecurityContextHolder;

/**
 * Created by sang on 2017/12/30.
 */
public class DoctorUtils {
    public static  Doctor getCurrentDoctor() {
        return (Doctor) SecurityContextHolder.getContext().getAuthentication().getPrincipal();
    }
}
